import * as React from 'react';
import FromBox from '../common/from';
import './mvvm.scss'
import filter  from '$filter';


class NotFound extends React.Component{
    constructor (props){
        super(props);

        this.state = {
            num :''
        }
    }

     render() {
         let num = this.state.num;
        return (
            <div className="react-mvvm-wrap c-react-home-wrap">
                <h2>简单实现双向数据绑定</h2>
                <section className="main-box">
                  <FromBox num={num} onChengFn={(num) =>{
                      this.setState({num})
                  }}/>
                  <p>
                      <span>钱数千分符：</span>
                      <span>{filter.moneyFn(this.state.num)}</span>
                  </p>
                </section>
            </div>
        );
    }
}

export default NotFound;
